home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / edit / aurora2.zip / UTILITY.AML < prev    next >
Text File  |  1995-01-26  |  2KB  |  62 lines

  1.  
  2. // ───────────────────────────────────────────────────────────────────
  3. // The Aurora Editor v2.0
  4. // Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
  5. //
  6. // Sample Utility Macro menu
  7. // ───────────────────────────────────────────────────────────────────
  8.  
  9.   // compile time macros and function definitions
  10.   include  bootpath "define.aml"
  11.  
  12.   // returns qualified macro filename
  13.   function  macpath (xfile)
  14.     return  getbootpath + "MACRO\\" + xfile + ".X"
  15.   end
  16.  
  17.   // define a popup menu to run the sample utility macros
  18.   menu  "util"
  19.     item " &Count Characters in a block or file"    runmacro (macpath "countchr")
  20.     item " Count &Words in a block or file"         runmacro (macpath "countwrd")
  21.     item " Add-up &Numbers in a block"              runmacro (macpath "sumblock")
  22.     item " Find the &Longest Line"                  runmacro (macpath "longline")
  23.     item " &Full Date and Time"                     runmacro (macpath "fulldate")
  24.     item " Draw a Bo&x around a column mark"        runmacro (macpath "drawbox")
  25.     item " &Remove Duplicate Lines"                 runmacro (macpath "deldup")
  26.     item " Delete &Blank lines in a block or file"  runmacro (macpath "delblank")
  27.  
  28.     item "-"
  29.     item " &Open Desktop Layout.."
  30.        file = ask "Desktop file" "_load"
  31.        if file then
  32.          opendesk (qualify file (getbufname))
  33.          restoredesk
  34.        end
  35.     item " &Save Desktop Layout.."
  36.        file = ask "Desktop file" "_load"
  37.        if file then
  38.          currdesk
  39.          savedesk (qualify file (getbufname))
  40.          display
  41.        end
  42.     item "-"
  43.     item " Display Key &Assignments"                runmacro (macpath "keydef")
  44.     item " Display &Keycodes"                       runmacro (macpath "keycodes")
  45.     item " &View DOS Memory"                        runmacro (macpath "viewmem")
  46.     item "-"
  47.     item " &Entab a Block or File"                  runmacro (macpath "tabs") 'e'
  48.     item " &Detab a Block or File"                  runmacro (macpath "tabs")
  49.     item "-"
  50.     item " Change Color &Palette"                   runmacro (macpath "palette")
  51.     item " Run &Installation"                       runmacro (bootpath "install.x")
  52.   end
  53.  
  54.   setbufname "util"
  55.  
  56.   // display the popup menu
  57.   popup "util" "Sample Utility Macros" 39
  58.  
  59.   // destroy the menu
  60.   destroybuf "util"
  61.  
  62.